-
Notifications
You must be signed in to change notification settings - Fork 273
Fix Cognito Auth endpoints mapping #6475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix Cognito Auth endpoints mapping #6475
Conversation
4a1df7f to
0bf1039
Compare
b79d900 to
83b9733
Compare
|
Hi @nathan-dovire , Thank you for your contribution to the AWS Amplify Flutter Library! Is there a reason this Pull Request is still a draft? |
|
Hi @cadivus, For context, in my use case authentication is handled via a custom auth endpoint that wraps the Cognito client. This Cognito client is protected by a client secret that is only available at runtime. The flow is:
With this setup, simply adding Importantly, this flow works as expected when testing against v1.8.*. However, after upgrading to v2.x and above, authentication breaks with the same configuration, which strongly suggests a regression introduced in v2+. Please let me know if this behavior is expected, or if there’s additional configuration or a recommended integration pattern for this scenario. I’m happy to help investigate further or contribute a fix once the intended behavior is clear. Thanks! |
|
Hi @nathan-dovire , The merged PR worked for us by setting the |

#5784
Completes the
userPoolEndpointImplementationThis PR completes completes the implementation started in commit
f37cb7e69which addeduserPoolEndpointtoAuthOutputsbut was missing a critical mapping step.Problem
The original work added the
userPoolEndpointfield to support custom Cognito endpoints (e.g., routing through a proxy), but the implementation was incomplete. The endpoint was being collected from Gen 1 configs but never actually passed to the Cognito User Pool configuration.Root Cause
The
CognitoUserPoolConfig.fromAuthOutputs()factory method was missing the endpoint mapping, breaking the configuration flow: